﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        SqlHelper SqlHelper = new SqlHelper();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string a = "insert into [StudentInfo]([gender],[stu_name],[password])values (@a,@b,@c)";
            SqlParameter[] sqls =
           {
            new SqlParameter("@a",TextBox1.Text),
            new SqlParameter("@b",TextBox2.Text),
            new SqlParameter("@c",TextBox3.Text)
            };
            if (SqlHelper.Execute(a, sqls))
            {

                Response.Write("<a href='WebForm1.aspx'>返回</a>");
            }
                
        }
    }
}